package main

import (
	"github.com/urfave/cli/v2"
	"go.uber.org/zap"
	"os"
	go_logger "platon-tools/go-service/go-logger"
	"platon-tools/go-service/version"
)

func main() {
	app := &cli.App{
		Name:                   "PlatOn monitor server",
		Usage:                  "PlatOn system tool",
		Version:                version.FormatVersion(),
		Flags:                  RootFlags,
		UseShortOptionHandling: true,
		Action:                 appRun,
	}

	err := app.Run(os.Args)
	if err != nil {
		go_logger.Logger.Error("service running failed", zap.String("service running failed", err.Error()))
	}
}
